package com.zengqingfa.juc.n4;

import java.text.SimpleDateFormat;

/**
 * @author zengqingfa
 * @className Test7
 * @description
 * @create 2021/6/10 23:06
 */
public abstract class Test7 {

    public void bar() {
        // 是否安全?线程不安全，foo方法被子类覆写
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        foo(sdf);
    }

    public abstract void foo(SimpleDateFormat sdf);

}